package com.ysh.webflux.service;


import com.ysh.webflux.pojo.User;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * Created by Jackiechan on 2022/9/22 9:14
 *
 * @author Jackiechan
 * @version 1.0
 * @since 1.0
 */
public interface UserService {
    //根据 id 查询用户
    Mono<User> getUserById(int id);
    //查询所有用户
    Flux<User> getAllUser();
    //添加用户
    Mono<Void> saveUserInfo(Mono<User> user);

    Flux<User> getUsersStream();
    //根据 id 查询用户
    User getUserById1(int id);
    //查询所有用户
    List<User> getAllUser1();
    //添加用户
    void saveUserInfo1(User user);



}
